﻿using System.ComponentModel;
using Utility.Enum;
using Utility;

namespace Model.BusinessModel.OutPut.sys
{
    /// <summary>
    /// 菜单表格列输出模型
    /// </summary>
    [EnitityMapping(MenuId = "380CA40B-8B62-4EBE-86D7-91AE48292F61")]
    public class SysMenuTableColsOutPut
    {
        /// <summary>
        /// 字段id
        /// </summary>
        [Description("字段id")]
        public string FieldId { get; set; } = string.Empty;

        /// <summary>
        /// 数据规则ID
        /// </summary>
        [Description("数据规则ID")]
        public required string RuleId { get; set; }

        /// <summary>
        /// 字段中文名
        /// </summary>
        [Description("字段中文名")]
        public string FieldCnName { get; set; } = string.Empty;

        /// <summary>
        /// 公司名称
        /// </summary>
        [Description("公司名称")]
        public string? CorporationName { get; set; }

        /// <summary>
        /// 系统名称
        /// </summary>
        [Description("系统名称")]
        public string? SystemName { get; set; }

        /// <summary>
        /// 所属菜单
        /// </summary>
        [Description("所属菜单")]
        public string? MenuName { get; set; }

        /// <summary>
        /// 规则名称
        /// </summary>
        [Description("规则名称")]
        public required string RuleName { get; set; }

        /// <summary>
        /// 规则类型：1：数据行规则 2：数据按钮规则 3:数据列权限规则
        /// </summary>
        [Description("规则类型")]
        public int? RuleType { get; set; }

        /// <summary>
        /// 规则类型：1：数据行规则 2：数据按钮规则  3：数据列规则
        /// </summary>
        [Description("规则类型名称")]
        public string RuleTypeStr => RuleType != null ? EnumHelper.GetDescription((RuleTypeEnum)RuleType) : "";

        /// <summary>
        /// 规则json
        /// </summary>
        [Description("规则json")]
        public string? RuleJson { get; set; }

        /// <summary>
        /// 英文匹配规则
        /// </summary>
        [Description("解析后的规则")]
        public string? AnalysisRule { get; set; }

        /// <summary>
        /// 中文匹配规则
        /// </summary>
        [Description("解析后的规则")]
        public string? AnalysisRule_CN { get; set; }

        /// <summary>
        /// 是否使用
        /// </summary>
        [Description("是否使用")]
        public bool IsOpen { get; set; }

        /// <summary>
        /// 规则备注
        /// </summary>
        [Description("规则备注")]
        public string? Remark { get; set; }

        /// <summary>
        /// 公司key
        /// </summary>
        [Description("公司key")]
        public string CorporationKey { get; set; } = string.Empty;

        /// <summary>
        /// 系统key
        /// </summary>
        [Description("系统key")]
        public string SystemKey { get; set; } = string.Empty;

        /// <summary>
        /// 菜单id
        /// </summary>
        [Description("菜单id")]
        public string MenuId { get; set; } = string.Empty;

        /// <summary>
        /// 字段类型
        /// </summary>
        [Description("字段类型")]
        public string FieldType { get; set; } = string.Empty;

        /// <summary>
        /// 字段英文名
        /// </summary>
        [Description("字段英文名")]
        public string FieldEnName { get; set; } = string.Empty;

        /// <summary>
        /// 字段宽度
        /// </summary>
        [Description("字段宽度")]
        public int FieldWidth { get; set; }

        /// <summary>
        /// 字段固定方向
        /// </summary>
        [Description("字段固定方向")]
        public string FieldFixed { get; set; } = string.Empty;

        /// <summary>
        /// 字段是否排序
        /// </summary>
        [Description("字段是否排序")]
        public bool FieldSortable { get; set; }

        /// <summary>
        /// 字段对齐方式
        /// </summary>
        [Description("字段对齐方式")]
        public string FieldAlign { get; set; } = string.Empty;

        /// <summary>
        /// 排序
        /// </summary>
        [Description("排序")]
        public int FieldOrderBy { get; set; }

        /// <summary>
        /// 字段插槽
        /// </summary>
        [Description("字段插槽")]
        public string FieldSlot { get; set; } = string.Empty;

        /// <summary>
        /// 是否显示
        /// </summary>
        [Description("是否显示")]
        public bool IsDisplay { get; set; }

        /// <summary>
        /// 创建时间
        /// </summary>
        [Description("创建时间")]
        public DateTime CreateTime { get; set; }

        /// <summary>
        /// 创建人id
        /// </summary>
        [Description("创建人id")]
        public string? CreateUser { get; set; }


        /// <summary>
        /// 创建人姓名
        /// </summary>
        [Description("创建人姓名")]
        public string? UserName { get; set; }
    }
}
